package com.hst.web.base.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hst.core.dao.IORDao;
import com.hst.core.dao.ISQLDao;

@Controller
@RequestMapping("/summary")
public class SummaryController {

	@Autowired
	IORDao dao;

	@Autowired
	ISQLDao sql;

	@RequestMapping("/sum")
	public void sum(Model m) {
		m.addAttribute("sum", sql.query("summary.sum"));
	}
	
	@RequestMapping("/sumContractorPerson")
	public void sumContractorPerson(Model m) {
		m.addAttribute("sum", sql.query("summary.list-contractor-person-sum"));
	}
	
	@RequestMapping("/sumCompanyVehicle")
	public void sumCompanyVehicle(Model m) {
		m.addAttribute("sum", sql.query("summary.list-company-vehicle-sum"));
	}
	
	@RequestMapping("/sumContractorVehicle")
	public void sumContractorVehicle(Model m) {
		m.addAttribute("sum", sql.query("summary.list-contractor-vehicle-sum"));
	}
}
